home *** CD-ROM | disk | FTP | other *** search
- Path: f411.n201!not-for-mail
- Newsgroups: comp.sys.cbm
- X-Comment-To: Stephen Judd
- From: Pontus Berg <Pontus.Berg@p71.anet.canit.se>
- Date: Wed, 17 Apr 96 22:30:29 +0200
- Subject: programming question:block-X commands
- Message-ID: <829805336@p71.f411.n201.z2.ftn>
- References: <1617696615@news.acns.nwu.edu>
- Organization: BoArDgasm, Farsta, Sweden
- X-FTN-AREA: CANIT_COMP_SYS_CBM
- X-FTN-MSGID: 2:201/411.71 3175d318
- X-FTN-REPLY: news.acns.nwu.edu 606c1767
- X-FTN-CHRS: IBMPC 2
- X-FTN-Tearline: Spot 1.3a #676
- X-FTN-Origin: BoArDgasm, Farsta, Sweden (2:201/411.71)
- X-FTN-SEEN-BY: 201/411
- X-FTN-PATH: 201/411
- X-FTN-PATH: 201/411
-
- In a message of 16 Apr 96 Stephen Judd wrote to All:
-
- >> hexprt pha
- >> asl
- >> asl
- >> asl
- >> asl
-
- SJ> Better make those lsr
-
- Right!
-
- >> jsr hexout
- >> pla
- >> hexout and #$0f
-
- SJ> And hexout can be moved here, to the tax -- gotta save those cycles!
- SJ> :).
-
- Right! Two wasted cycles! I better kill myself over this :-D
-
- >> tax
- >> lda hextab,x
- >> jmp $ffd2
-
- SJ> And of course you might want an rts here :)
-
- NOPE, I DON'T! A JMP alway include the RTS in the end of the called routine so
- you suggestion would cause more "wear and tear" on the stack, 12 extra cycles
- and also one byte longer! You'll better go for the PC next :-)
-
- >> hextab .text "0123456789abcdef"
-
- SJ> If you want screen codes, you might use
-
- SJ> HEXOUT
- SJ> CLC
- SJ> ADC #48
- SJ> CMP #58
- SJ> BCC :L1
- SJ> SBC #57
- SJ> :L1 STA wherever, say (zp),y plus an INY
- SJ> RTS
-
- ... which also saves four bytes :-)
-
- )==========================================================(
- ) o/ Bacchus@FairLight.COM Fido: 2:201/411.71 (
- ) (# I'm a "geek tool" so ask about emulators elsewhere! (
- )=/7=======================================================(
-
- ... MicroSoft, as good as AIDS!
- (Pontus)
-